package com.taru.university.service.impl;

import com.taru.university.mapper.UserMapper;
import com.taru.university.model.User;
import com.taru.university.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    UserMapper userMapper;
    @Override
    public User queryUserById(String userId) {
        return userMapper.queryUserById(userId);
    }

    @Override
    public User login(String userName, String userPassword, String userSort) {
        return userMapper.login(userName, userPassword, userSort);
    }

    @Override
    public void updateUserById(User user) {
         userMapper.updateUserById(user);
    }

    @Override
    public void insertUser(User user) {
         userMapper.insertUser(user);
    }

    @Override
    public void updateUserByQuestion(User user) {
        userMapper.updateUserByQuestion(user);
    }
}
